const { sequelize, DataTypes } = require('../utill/getSequelize')


//标签表
const T_exam_paper_info = sequelize.define('T_exam_paper_info', {

    id: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        autoIncrement: true,
    },

    type: {
        type: DataTypes.STRING,
    },

    order: {
        type: DataTypes.JSON,
    },

    subId: {
        type: DataTypes.INTEGER
    },
    //标记
    t_user_and_a_c_s_id: {
        type: DataTypes.INTEGER,
        allowNull: false,
    },

}, {
    underscored: true
});


//同步模型和数据库表
(async () => {
    try {
        await sequelize.sync({ force: false });
        console.log('All models were synchronized successfully.');
    } catch (error) {
        console.log(error);
    }

})();

//提供出去
module.exports = { T_exam_paper_info };